/*
 * Filename CheckAppMapping.java 2022年04月19日
 * Copyright © Ehome Co.Ltd. All Rgiths Reserved.
 * @author wuyingchao
 */
package com.ehome.poct.terminal.mapping;

import com.ehome.poct.base.api.dto.device.TestDeviceDTO;
import com.ehome.poct.base.api.vo.device.TestDeviceVO;
import com.ehome.poct.core.api.dto.check.project.EhomeProjectDTO;
import com.ehome.poct.terminal.api.vo.CheckProjectItemVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * @author wyc
 * @since 2022/04/19 14:03
 **/
@Mapper(componentModel = "spring")
public interface CheckAppMapping {
    TestDeviceDTO to(TestDeviceVO vo);

    @Mapping(target = "cnName", source = "fullName")
    @Mapping(target = "enName", source = "name")
    CheckProjectItemVO to(EhomeProjectDTO dto);

    List<CheckProjectItemVO> to(List<EhomeProjectDTO> dtos);
}